<template>
  <el-form :inline="true" :model="formSearch" class="demo-form-inline" size="mini">
    <el-form-item style="width: 70px;">
      <el-select v-model="formSearch.pinTai" placeholder="平台">
        <el-option
          v-for="item in formSearch.pintai"
          :key="item.value"
          :label="item.label"
          :value="item.value"
        />
      </el-select>
    </el-form-item>
    <el-form-item>
      <el-select v-model="formSearch.leiXing" placeholder="任务类型">
        <el-option
          v-for="item in formSearch.taskType"
          :key="item.value"
          :label="item.label"
          :value="item.value"
        />
      </el-select>
    </el-form-item>
    <el-form-item>
      <el-select v-model="formSearch.dianMing" placeholder="店名/昵称">
        <el-option
          v-for="item in formSearch.storeName"
          :key="item.value"
          :label="item.label"
          :value="item.value"
        />
      </el-select>
    </el-form-item>
    <el-form-item>
      <el-select v-model="formSearch.tuiKuan" placeholder="是否退款">
        <el-option
          v-for="item in formSearch.haveBackMon"
          :key="item.value"
          :label="item.label"
          :value="item.value"
        />
      </el-select>
    </el-form-item>
    <el-form-item>
      <el-select v-model="formSearch.yuShou" placeholder="预售/隔日">
        <el-option
          v-for="item in formSearch.styleCell"
          :key="item.value"
          :label="item.label"
          :value="item.value"
        />
      </el-select>
    </el-form-item>
    <el-form-item style="width: 220px;">
      <el-input
        v-model="formSearch.keyWords"
        placeholder="关键词/店账号/ID/订单号/任务编号"
        style="width: 220px"
      />
    </el-form-item>
    <el-form-item style="width: 190px;">
      <el-date-picker
        v-model="formSearch.dateStr"
        type="daterange"
        range-separator="至"
        start-placeholder="开始日期"
        end-placeholder="结束日期"
      />
    </el-form-item>
    <el-form-item style="width: 250px;">
      <el-button type="primary" @click="onSubmit">查询</el-button>
      <el-button type="primary" @click="onSubmit">导出</el-button>
      <el-button type="primary" @click="onSubmit">+添加店铺</el-button>
    </el-form-item>
  </el-form>
</template>

<script>
export default {
  data() {
    return {
      formSearch: {
        pintai: [
          { value: 'tao', label: '淘宝' },
          { value: 'pin', label: '拼多多' },
          { value: 'jing', label: '京东' }
        ],
        taskType: [
          { value: '1', label: '好评' },
          { value: '2', label: '差评' }
        ],
        storeName: [
          { value: '312', label: '武汉好店铺' },
          { value: '323', label: '上海运动器械' }
        ],
        haveBackMon: [
          { value: true, label: '是' },
          { value: false, label: '否' }
        ],
        styleCell: [
          { value: 1, label: '预售' },
          { value: 2, label: '隔日' }
        ],
        pinTai: '',
        leiXing: '',
        dianMing: '',
        tuiKuan: '',
        yuShou: '',
        keyWords: '',
        dateStr: ''
      }
    }
  },
  methods: {
    onSubmit() {
      console.log('submit!')
    }
  }
}
</script>

<style lang="scss" scoped>
.el-form {
  padding-top: 20px;
}

.el-form-item {
  width: 100px;
}
</style>
